const ip = require('ip')

module.exports = env => {
  return {
    devServer: {
      historyApiFallback: true,
      stats: 'minimal',
      noInfo: false,
      compress: true,
      host: ip.address(),
      disableHostCheck: true,
      proxy: {
        '/b': {
          target: 'http://192.168.1.252:8017',
          changeOrigin: true,
          // secure: false,
          pathRewrite: {'^/b': ''}
        },
        '/g': {
          target: 'http://192.168.1.252:8018',
          changeOrigin: true,
          secure: false,
          pathRewrite: {'^/g': ''}
        }
      }
    }
  }

}
